	.text
main:
	# FUNCTION PROLOGUE
	subu $sp, $sp, 84
	sw $s0, 8($sp)
	sw $s1, 12($sp)
	sw $ra, 76($sp)
	sw $fp, 80($sp)
	addu $fp, $sp, 84
	# END FUNCTION PROLOGUE

	li $s0, 91
	li $s1, 67
	move $a0, $s0
	move $a1, $s1
	# PRE-CALL -> NO REGISTER NEEDS TO BE SAVED
	jal foo
	move $s0, $v0
	j L15
L15:
	# FUNCTION EPILOGUE
	lw $fp, 80($sp)
	lw $ra, 76($sp)
	lw $s0, 8($sp)
	lw $s1, 12($sp)
	addu $sp, $sp, 84
	jr $ra 
	# END FUNCTION EPILOGUE

foo:
	# FUNCTION PROLOGUE
	subu $sp, $sp, 84
	sw $s0, 8($sp)
	sw $s1, 12($sp)
	sw $s2, 16($sp)
	sw $s3, 20($sp)
	sw $ra, 76($sp)
	sw $fp, 80($sp)
	addu $fp, $sp, 84
	# END FUNCTION PROLOGUE

	move $s1, $a0
	move $s0, $a1
	li $s3, 20
	bgt $s1, $s0, L8
L9:
	li $s2, 0
L10:
	bgtz $s2, L11
L12:
	li $s1, 2
	mul $s1, $s1, $s3
	add $s0, $s0, $s1
L13:
	move $a0, $s0
	# PRE-CALL -> NO REGISTER NEEDS TO BE SAVED
	jal printInt
	move $s1, $v0
	move $v0, $s1
	j L14
L8:
	li $s2, 1
	j L10
L11:
L5:
	bgt $s1, $s0, L2
L3:
	li $s2, 0
L4:
	bgtz $s2, L7
L6:
	add $s0, $s1, $s0
	add $s0, $s0, $s3
	j L13
L2:
	li $s2, 1
	j L4
L7:
	sub $s1, $s1, 3
	add $s0, $s0, 4
	j L5
L14:
	# FUNCTION EPILOGUE
	lw $fp, 80($sp)
	lw $ra, 76($sp)
	lw $s0, 8($sp)
	lw $s1, 12($sp)
	lw $s2, 16($sp)
	lw $s3, 20($sp)
	addu $sp, $sp, 84
	jr $ra 
	# END FUNCTION EPILOGUE

	.data
